#!/bin/bash

# 运行脚本，用于训练和测试LSTM模型

echo "CLIP-LSTM Training Script"
echo "========================"

# 检查是否有参数
if [ $# -eq 0 ]; then
    echo "Usage: ./run.sh [clip|lstm|clip_lstm]"
    echo "Default: clip_lstm"
    MODEL="clip_lstm"
else
    MODEL=$1
fi

echo "Training model: $MODEL"

# 根据参数运行相应的模型
case $MODEL in
    "clip")
        echo "Training CLIP model..."
        python main.py --model clip --epochs 3 --batch_size 16
        ;;
    "lstm")
        echo "Training LSTM model..."
        python main.py --model lstm --epochs 5 --batch_size 32
        ;;
    "clip_lstm")
        echo "Training CLIP-LSTM hybrid model..."
        python main.py --model clip_lstm --epochs 3 --batch_size 16
        ;;
    *)
        echo "Invalid model type. Please choose from: clip, lstm, clip_lstm"
        exit 1
        ;;
esac

echo "Training completed!"